package com.shop.cereshop.commons.constant;

/**
 * @description: TODO 
 * @author lx
 * @date 2025/10/25 15:04
 * @version 1.0
 */
public class BondConstant {
    /**
     * 交易类型
     */
    public static class TransactionType {
        /** 充值 */
        public static final Integer RECHARGE = 1;
        /** 提现 */
        public static final Integer WITHDRAWAL = 2;
    }

    /**
     * 支付方式
     */
    public static class PayType {
        /** 微信支付 */
        public static final Integer WECHAT = 1;
        /** 支付宝支付 */
        public static final Integer ALIPAY = 2;
        /** 银行卡 */
        public static final Integer BANK_CARD = 3;
    }

    /**
     * 支付状态
     */
    public static class PayState {
        /** 待支付 */
        public static final Integer PENDING = 0;
        /** 支付成功 */
        public static final Integer SUCCESS = 1;
        /** 支付失败 */
        public static final Integer FAILED = 2;
        /** 已取消 */
        public static final Integer CANCELLED = 3;
    }

    /**
     * 提现方式
     */
    public static class WithdrawalType {
        /** 微信零钱 */
        public static final Integer WECHAT_BALANCE = 1;
        /** 支付宝余额 */
        public static final Integer ALIPAY_BALANCE = 2;
        /** 银行卡 */
        public static final Integer BANK_CARD = 3;
    }

    /**
     * 提现状态
     */
    public static class WithdrawalState {
        /** 待审核 */
        public static final Integer PENDING = 0;
        /** 审核通过 */
        public static final Integer APPROVED = 1;
        /** 审核拒绝 */
        public static final Integer REJECTED = 2;
        /** 提现中 */
        public static final Integer PROCESSING = 3;
        /** 提现成功 */
        public static final Integer SUCCESS = 4;
        /** 提现失败 */
        public static final Integer FAILED = 5;
    }

    /**
     * 订单类型
     */
    public static class OrderType {
        /** 充值订单 */
        public static final Integer RECHARGE = 1;
        /** 提现订单 */
        public static final Integer WITHDRAWAL = 2;
    }

    /**
     * 操作人类型
     */
    public static class OperatorType {
        /** 店铺 */
        public static final Integer SHOP = 1;
        /** 系统 */
        public static final Integer SYSTEM = 2;
        /** 管理员 */
        public static final Integer ADMIN = 3;
    }

    /**
     * 支付密码操作类型
     */
    public static class PayPasswordOperationType {
        /** 设置密码 */
        public static final Integer SET = 1;
        /** 修改密码 */
        public static final Integer MODIFY = 2;
        /** 验证密码 */
        public static final Integer VERIFY = 3;
        /** 重置密码 */
        public static final Integer RESET = 4;
    }

    /**
     * 支付密码相关配置
     */
    public static class PayPasswordConfig {
        /** 最大错误次数 */
        public static final Integer MAX_ERROR_COUNT = 5;
        /** 锁定时间(分钟) */
        public static final Integer LOCK_TIME_MINUTES = 30;
        /** 密码长度 */
        public static final Integer PASSWORD_LENGTH = 6;
    }

    /**
     * 钱包相关配置
     */
    public static class WalletConfig {
        /** 最小充值金额 */
        public static final String MIN_RECHARGE_AMOUNT = "1.00";
        /** 最大充值金额 */
        public static final String MAX_RECHARGE_AMOUNT = "50000.00";
        /** 最小提现金额 */
        public static final String MIN_WITHDRAWAL_AMOUNT = "10.00";
        /** 最大提现金额 */
        public static final String MAX_WITHDRAWAL_AMOUNT = "50000.00";
        /** 充值订单过期时间(分钟) */
        public static final Integer RECHARGE_EXPIRE_MINUTES = 30;
    }

    /**
     * 支付密码设置结果
     */
    public enum PayPasswordSetResult {
        SUCCESS,           // 设置成功
        ALREADY_SET,       // 已经设置过
        FAILED            // 设置失败
    }

    /**
     * 支付密码修改结果
     */
    public enum PayPasswordModifyResult {
        SUCCESS,           // 修改成功
        NOT_SET,           // 未设置支付密码
        OLD_PASSWORD_ERROR, // 旧密码错误
        FAILED            // 修改失败
    }
}
